refacoring of login screen