code for login, logout and registration
code changes for login, logout and registration