Finishing Login functionality