Added user info api and cleaned up my code a bit