checks if user is in database and assigns current