What ever the serverside scripting you can use, the logic relies same.
the following are the step you need to take care.
Add a column to the DB in the UserInfo table "isLoggedIn" as BIT field with default value "FALSE".
When ever user logged into your web application with "Remeber Me" check box checked, set the "isLoggedIn" column remains "True", untill he/she eagerly click on the "SIGN OUT" option of your web application. if he/she click on the "Sign out" option then set the "isLoggedIn" column to "FALSE".
And when ever the user loging in, create the client side cookie for the user. so when the next time page load check the client side cookie, for the user and check the DB column "isLoggedIn" for the same user is "TRUE" if its "True" dont stop the user for login otherwise ask he/she to login.
Hope i am clear, if it confuses you kindly let me know.
Good Luck.