Fixed disabled sign in button and other javascript errors