Fixed minor bug, profile dynamic

Fixed a small bug where a logged in user would be redirected to the
register page when clicking on the profile link, logout works now
properly (With and without cookies).

Profile picture uploading has been made to save the MD5 Hash instead of
the normal filename, with the original file extension.