login gets and posts to database