signin/out functionality with errors