Registration, login and logout code added