Various updates

Added redirect functionality to checklogin() and updated affected files.
Header is now dynamic (inc. logo and working links)
Added logout functionality