Login/Register functionality, base javascripts, error handling