Replaced log-in to sign-in and refactored a little