Revise login, logout, register function. Writing functions for band