Various Form Changes

replaced username with email
added most of the logic for registration and login