ajax script for login

see comment - not sure on the syntax for the script but this is how it
should work.