Updated login process: redirection to home page when successful