public void actionlogin(){
		blogin.addActionListener(new ActionListener() 
		{
			public void actionPerformed(ActionEvent ae) 
			{
					try{
				        Class.forName("com.mysql.jdbc.Driver").newInstance();
				        }
				        catch (IllegalAccessException e)
				        {System.out.println(e);}
						catch(InstantiationException e)
				        {System.out.println(e);}
				        catch(ClassNotFoundException e)
				        {System.out.println(e);}

					try
					{ 
						String puname = txuser.getText();
						String ppaswd = pass.getText();
						
			            Connection conn = DriverManager.getConnection(dburl,"bob","bob123"); 

			            String sql_Q ="SELECT * FROM brukere WHERE brukernavn='" + puname + "'";
			            // create the java statement
			            Statement st = conn.createStatement();
			            
			            // execute the query, and get a java resultset
			            ResultSet rs = st.executeQuery(sql_Q);
			    		System.out.println("Connection");
			    		
			    		if(rs.next())
			    		{
			    			dbpassword = rs.getString("passord");
			    			dbusername = rs.getString("brukernavn");
			    			System.err.println("Databasen sier at brukernavnet er: " + dbusername);
							System.err.println("Databasen sier at passordet er: " + dbpassword);
							System.err.println("Bruker sier at brukernavnet er: " + puname);
							System.err.println("Bruker sier at passordet er: " + ppaswd);
			    		}
			    		
			    		
			    		if(puname.equals(dbusername) && ppaswd.equals(dbpassword)) 
						{
							GUI regFace = new GUI();
							regFace.setVisible(true);
							dispose();
						} 
						else 
						{
							JOptionPane.showMessageDialog(null,"Feil Passord / Brukernavn");
							txuser.setText("");
							pass.setText("");
							txuser.requestFocus();
							System.out.println("Feil brukernavn og passord innskrevet.");
						}
					}
					
					catch (SQLException e)
					{
						System.out.println(e);
					}
			}
		}
		);
	}