fixed login javascript for responsive design