Login/Registration Done with Ajax, Custom Functions are moved to seperate file