adding functionality to store user on logging in