Profile validation

added field validation, added logic for switching between pages
correctly based on if username is in database or not, moved db query
code to ProfileData