added api folder and implemented php functions for login and account creation