Seperated functions for creating and finding(almost completely) users.  Completed login system with secure cookie enabled session.