php notice fix
authorization errors fix
move authorization html into template, refactor.
mysqli support fix