Fixed bug with PHP header() function. Fixed problem with referring URL when there is an authentication step. Fixed a URL problem caused by the difference of folder structure on my local machine and the remote server.