refactored and fixed login buttons