Signin/up/out functionality working with ajax