PHP code for singup, login and Logout with encryption