Completed login, logout and register