Java Login/Registration System
<p>I want to develop a simple login and registration system. The system needs to be able to register a user and allow them to login. Not only this i need to be able to identify who is the current user logged in.</p>

<p>User Class</p>

<pre><code>import java.io.Serializable;


public class AuctionHouseUsers implements Serializable {

    String userName;
    String password;

    public AuctionHouseUsers(String aUserName, String aPassword)
    {
        this.userName = aUserName;
        this.password = aPassword;
    }
    public String getUserName()
    {
        return userName;
    }
    public void setUserName(String aUserName)
    {
        this.userName = aUserName;
    }
    public String getPassword()
    {
        return password;
    }
    public void setPassword(String aPassword)
    {
        this.password = aPassword;
    }
}
</code></pre>

<p>AuctionHouse Class</p>

<pre><code>    public class AuctionHouseManager

ArrayList&lt;AuctionHouseUsers&gt; registeredUsers;
ArrayList&lt;AuctionHouseUsers&gt; logedInUsers;


public AuctionHouseManager()

    logedInUsers = new ArrayList&lt;AuctionHouseUsers&gt;();
    registeredUsers = new ArrayList&lt;AuctionHouseUsers&gt;();
}
    public void registerUser(String username, string password)
    {
        AuctionHouseUsers registeredUser = new AuctionHouseUser(username,password);
        registeredUsers.add(tempUser);
    }
    public void logIn(String username, string password)
    {
      AuctionHouseUsers logedInUser = new AuctionHouseUser(username,password);
      logedInUsers.add(logedInUser);
    }
</code></pre>

<p>How can i keep track of who (by there username) is currently logged in at this moment in time as i will be designing a gui.</p>
