check login for the first time and redirect