Fixed sign-out functionality and added alert messages for failed logins.