Added sign-in logic and session controller