move forms js code to a file; activate it for login in buttons