refactored ajax on signin and register buttons. now JS only