protected void btnLogin_Click(object sender, EventArgs e) { using (PoslovniKlubBL temp = new PoslovniKlubBL()) { Users user = temp.AuthenticateUser(txtUsername.Text, txtPassword.Text); if (user != null) { Session.Add("LoggedUser", user); if (Request.QueryString != null) { if (Request.QueryString["ReturnUrl"] != null) { Response.Redirect(Request.QueryString["ReturnUrl"]); } else { Response.Redirect("/Public/Default.aspx"); } } else { Response.Redirect("/Public/Default.aspx"); } } else { ResetFields(); } } }