I am using below code to get the user login gender information &amp; store in SESSION, I want to call below code after login, I already try this hook function bartik_user_login(&amp;$edit, $account) {}but its not working. Please help. Thanks

if (user_is_logged_in())
{    
global $user;
    $uid = user_load($user-&gt;uid);
    $profile_main = profile2_load_by_user($uid, 'main');
    $field_iam = field_get_items('profile2',$profile_main,'field_i_am_field');
    $_SESSION['i_am']=$field_iam[0][value];
    echo $_SESSION['i_am'];
}



Question: Log In / Sign Up on Splash screen?
Answer: I would suggest skipping the splash screen, as this will only delay the user. The answer to your login/signup question depends on the requirements of your application. Here are the various ways it could be done.


If authentication is required to access any content on the application, because it will not function without it, then have a dedicated login/signup as your first screen. 
If login is only required for some of your applications features, then I would drop the user directly into your application. When a user attempts to use a feature where authentication is required, then ask them to login/signup.