added login and php server functionality