update function login with LDAP, check login, layout