PHP functions to handle registration and login functionalities at a WebSite