Suite CRM Login Page

I am trying to customize the SuiteCRM. Before that i want to fetch table values based on the logged in user. I partially completed this task but the SQL query I wrote in the same index.php. I want to write the SQL query in the login php file. But
I couldn’t find the file. Please help me to get all the file that is related to the login; ie,view,model,controller files.
Thanks in advance.

Hi @samthomaskb08
There is a global variable for the current user.