Updated yourprofile.php to be more secure and to set state properly

Fixed some minor bugs in the code which applied the wrong updates to the
wrong user
Updated timesheet.php